package com.han.yrpc.registrycenter.localcache;

import com.han.yrpc.core.registry.ServiceInfo;
import org.springframework.stereotype.Component;

@Component
public class ServiceRegistryHandle {

    private final ServiceProvider serviceProvider;

    public ServiceRegistryHandle(ServiceProvider serviceProvider) {
        this.serviceProvider = serviceProvider;
    }

    public void registry(String serviceName, ServiceInfo serviceInfo) {
        serviceProvider.addService(serviceName, serviceInfo);
    }

}
